package com.spa.application.command.shop;

import com.spa.application.command.common.rule.RuleAddCommand;
import com.spa.infrastructure.util.UrlUtil;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class MassagistEditCommand {

    @NotNull
    private Long massagistId;

    private String name;

    private String workPhoto;

    private String lifePhoto;

    private String lengthOfEmployment;

    private List<Long> serviceList;

    private String introduce;

    private String idCardTails;

    private String idCardFront;

    private String lon;

    private String lat;

    private Integer type;

    private Integer tag;

    private List<RuleAddCommand> ruleParamList;

    public void setIdCardTails(String idCardTails) {
        this.idCardTails = UrlUtil.handleUrl(idCardTails, ",");
    }

    public void setIdCardFront(String idCardFront) {
        this.idCardFront = UrlUtil.handleUrl(idCardFront, ",");
    }

    public void setWorkPhoto(String workPhoto) {
        this.workPhoto = UrlUtil.handleUrl(workPhoto, ",");
    }

    public void setLifePhoto(String lifePhoto) {
        this.lifePhoto = UrlUtil.handleUrl(lifePhoto, ",");
    }
}
